<template>
    <div>
        <el-dialog
            title="查看"
            :visible.sync="dialogVisible"
            width="1400px"
         :close-on-click-modal="false">
            <div class="card-box">
                <div class="data-title">基本信息</div>
                <el-form ref="editForm" :model="form"  size="small">
                    <div class="form-wrap">
                        <el-form-item label="考核编号" prop="assessCode">
                            <el-input disabled  v-model="form.assessCode" maxlength ="100" ></el-input>
                        </el-form-item>
                        <el-form-item label="考核名称" prop="assessName">
                            <el-input disabled  v-model="form.assessName" maxlength ="32"></el-input>
                        </el-form-item>
                        <el-form-item label="考核单位" prop="customerName" >
                            <el-input disabled v-model="form.customerName"></el-input>
                        </el-form-item>
                        <el-form-item label="考核时间" prop="assessDate">
                            <el-input disabled v-model="form.assessDate"></el-input>
                        </el-form-item>
                        <el-form-item label="考核分数" prop="score">
                            <el-input disabled v-model="form.score"></el-input>
                        </el-form-item>
                        <el-form-item label="考核结果" prop="assessResult">
                            <el-input disabled v-model="form.assessResult" ></el-input>
                        </el-form-item>
                        <el-form-item label="备注" prop="remarks">
                            <el-input disabled v-model="form.remarks" maxlength ="255" ></el-input>
                        </el-form-item>
                    </div>
                </el-form>
                <div class="data-title" style="padding-top: 30px">考核内容</div>
                <el-table
                    :data="tableData"
                    align="center">
                    <el-table-column
                        label="序号"
                        type="index"
                        align="center"
                        width="80"
                    >
                    </el-table-column>
                    <el-table-column
                        label="考核"
                        prop="item"
                        align="center"
                        width="120"
                    >
                    </el-table-column>
                    <el-table-column
                        width="120"
                        label="权重%"
                        align="center"
                        prop="weightValue">
                    </el-table-column>
                    <el-table-column
                        label="评分说明"
                        width="300"
                        align="center"
                        prop="templateRemarks">
                    </el-table-column>
                    <el-table-column
                        width="100"
                        label="评分"
                        align="center"
                        prop="score">
                    </el-table-column>
                </el-table>
            </div>
            <div class="card-box" style="text-align: right;padding-top: 40px">
                <el-button type="primary" size="small" @click="dialogVisible=false">关闭</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    import {getObj} from '../api/assess-result'
    export default {
        name: "show-result",
        data(){
            return{
                dialogVisible:false,
                form:{},
                tableData:[],
            }
        },
        methods:{
            show(item){
                this.dialogVisible=true
                this.form=item
                getObj(item.assessResultId).then(res=>{
                    this.tableData=res.data.data
                })
            }
        }
    }
</script>

<style lang='scss' scoped>
    @include data-title();
    @include info-list(3);
    @include formWrap(4);
</style>
